<!DOCTYPE html>
<html lang="ch-CN">
<head>
    <meta charset="UTF-8">
    <title>三元运算符</title>
</head>
<style>
    * {
        font-size: 30px;
        text-decoration: none;
    }
</style>
<script>
    while (true) {
        let num_1 = prompt("请输入第一个数！！")
        let num_2 = prompt("请输入第二个数！！")
        let num_3 = prompt("请输入第三个数！！")
        if (isNaN(num_1)
            || isNaN(num_2)
            || isNaN(num_3)
            || num_1 === ""
            || num_2 === ""
            || num_3 === "") {
            alert("请在输入框内输入数值！！！")
        } else {
            let test = num_1 > num_2 ? num_1 : num_2
            let result = test > num_3 ? test : num_3
            document.write("最大值为：" + result)
            break
        }
    }
</script>
<body>
</body>
</html>